<?php
	add_filter('manage_coupon_posts_columns', 'admin_coupon_storename_header_columns', 10, 1);
	add_action('manage_coupon_posts_custom_column', 'admin_coupon_storename_datarow', 10, 2);

	function admin_coupon_storename_header_columns($columns)
	{
		if (!isset($columns['store_name']))
			$columns['store_name'] = "Store name";

		return $columns;
	}

	function admin_coupon_storename_datarow($column_name, $post_id)
	{
	   
		switch ($column_name)
		{
			case 'store_name':
				$store_id = get_post_meta($post_id, 'store_coupon_metadata', true);
                $store_name = get_post_field('post_title',$store_id);
				if ($store_name)
					echo $store_name;
				break;

			default:
				break;
		}
	}
